﻿using System.Collections.Generic;
using WeBlog.Interfaces;
using WeBlog.Models;
using WeBlog.Repositories;

namespace WeBlog.Models
{
    public class ManageAccountsViewModel : GridModel<User>
    {
        private UserRepository _userRepository;
        public ManageAccountsViewModel(GridSettings settings, IUnitOfWork unitOfWork ) :
            base(settings)
        {
            _userRepository = new UserRepository(unitOfWork);
            Settings.DefaultSortColumn = "LastName";            
        }

        public IEnumerable<Role> Roles { get; set; }



        public override System.Linq.IQueryable<User> GetSuperSet()
        {
            return _userRepository.FindAll();
        }
    }
}